import { dateFormat, getYesterday } from '@/utils/date';

export default {
  height: 'auto',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  border: true,
  index: true,
  viewBtn: true,
  editBtn: false,
  delBtn: false,
  selection: true,
  dialogClickModal: false,
  column: [
    {
      label: "",
      prop: "id",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "记录日期",
      prop: "recordDay",
      type: "date",
      format: "YYYY-MM-DD",
      valueFormat: "YYYY-MM-DD",
      span: 26,
      width: 100,
      search: true,
      searchValue: dateFormat(getYesterday(), "yyyy-MM-dd"),
    },
    {
      label: "笔记名称",
      prop: "title",
      type: "input",
      overHidden: true,
      span: 24,
      width: 100,
      search: true
    },
    {
      label: "运营人",
      prop: "operator",
      type: "select",
      search: true,
      width: 100,
      dicUrl: "/blade-system/user/user-list?deptId=1746830243086417922",
      props: {
        label: "name",
        value: "id"
      },
    },
    // {
    //   label: "笔记ID",
    //   prop: "noteId",
    //   type: "input",
    //   span: 24,
    // },
    {
      label: "笔记链接",
      prop: "noteUrl",
      type: "url",
      span: 24,
      overHidden: true,
      width: 90,
      showOverflowTooltip: true
      // formatter: (row, column, value, index) => {
      //   return "url"; // 这里替换成你想要显示的固定值
      // }
    },
    {
      label: "作者昵称",
      prop: "redbookUsername",
      type: "input",
      span: 24,
      search: true,
      width: 100,
    },
    // {
    //   label: "作者ID",
    //   prop: "redbookId",
    //   type: "input",
    //   span: 24,
    // },
    {
      label: "小红书内容",
      prop: "context",
      type: "input",
      span: 24,
      hide: true,
      viewDisplay: false,
    },
    {
      label: "小红书标签",
      prop: "labels",
      type: "input",
      hide: true,
      viewDisplay: false,
    },
    {
      label: "发布时间",
      prop: "publishTime",
      type: "date",
      format: "YYYY-MM-DD HH:mm:ss",
      valueFormat: "YYYY-MM-DD HH:mm:ss",
      span: 24,
      search: false,
      width: 100,
    },
    {
      label: "发布ip地区",
      prop: "publishIp",
      type: "input",
      span: 24,
      hide: true,
      viewDisplay: false,
    },
    {
      label: "阅读次数",
      prop: "readCount",
      type: "input",
      span: 24,
      search: false,
      sortable: true, // 开启排序
      width: 110
    },
    {
      label: "点赞数",
      prop: "likeCount",
      type: "input",
      span: 24,
      search: false,
      sortable: true, // 开启排序
      width: 100
    },
    {
      label: "收藏次数",
      prop: "collectCount",
      type: "input",
      span: 24,
      search: false,
      sortable: true, // 开启排序
      width: 110
    },
    {
      label: "评论次数",
      prop: "contentCount",
      type: "input",
      span: 24,
      search: false,
      sortable: true, // 开启排序
      width: 110
    },
    {
      label: "分享次数",
      prop: "shareCount",
      type: "input",
      span: 24,
      search: false,
      sortable: true, // 开启排序
      width: 110
    },
    {
      label: "平均阅读时长(s)",
      prop: "averageReadingTime",
      type: "input",
      span: 24,
      width: 160,
      search: false,
      sortable: true, // 开启排序
    },
    {
      label: "弹幕次数",
      prop: "barrageCount",
      type: "input",
      span: 24,
      sortable: false, // 开启排序
      width: 100,
    },
    {
      label: "创建人",
      prop: "createUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "创建部门",
      prop: "createDept",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "创建时间",
      prop: "createTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "修改人",
      prop: "updateUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "修改时间",
      prop: "updateTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "状态",
      prop: "status",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "是否已删除",
      prop: "isDeleted",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
  ],
  defaultSort: {
    prop: 'recordDay',
    order: 'descending'
  },
}